Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only add signal handler on main thread #668

Merged
merged 2 commits into from
Sep 5, 2024

Conversation

jacobtomlinson
Copy link
Member

@jacobtomlinson jacobtomlinson commented Aug 29, 2024

The new runners added in #659 use signal handlers to shut down. This is because the Dask distributed scheduler and worker hang when we call sys.exit() dask/distributed#8644.

We only need to add these handlers if you're using the runners, and its probably safe to assume that the runners will only be used from the main thread. So this PR adds a check that skips adding the handler if we are in a child thread.

Closes #667

@jacobtomlinson jacobtomlinson marked this pull request as ready for review August 29, 2024 06:55
@jacobtomlinson jacobtomlinson merged commit b07308e into dask:main Sep 5, 2024
10 of 11 checks passed
@jacobtomlinson jacobtomlinson deleted the main-thread-shutdown branch September 5, 2024 10:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

signal errors when importing dask_jobqeueue from a thread
1 participant